@extends('layout/admin')

@section('headcss')
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <link rel="stylesheet" href="{{ URL::asset('admin/icheck/minimal/red.css')}}">

    <style type="text/css">
        .layui-table-cell{height: 100px;line-height: 100px;}
        #imgadd{width:150px;display: none; padding-left:110px; padding-top:10px;}
        .chongbutd{display: none; padding-left:140px; padding-top:10px;}
        #imgupdate{width:150px;display: none; padding-left:110px; padding-top:10px;}
    </style>
@stop

@section('content')
  <div class="layui-body">
    <!-- 内容主体区域 -->
    <div style="padding: 15px;">
        <fieldset class="layui-elem-field">
            <legend>{{$label}}</legend>
            <div class="layui-field-box">
              <hr>
              <div class="layui-btn-group">
                  <button class="layui-btn layui-btn-normal add-tan" add-url="" >
                      <i class="layui-icon">&#xe654;</i>新增
                  </button>
                  <button class="layui-btn layui-refresh">
                      <i class="layui-icon">&#xe9aa;</i>刷新
                  </button>
              </div>
              <hr>
              <table id="nevimsg" lay-filter="datalist"></table>

              <script type="text/html" id="img">
                  <img src="{{ URL::asset('/img')}}/<< d.miss_pic >>" >
              </script>

              <!-- 操作按钮 -->
              <script type="text/html" id="barDemo">
                  <a class="layui-btn  layui-btn-sm" lay-event="edit">编辑</a>
                  <a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="del">删除</a>
              </script>

              <div id="fenye"></div>

            </div>
        </fieldset>
    </div>
  </div>

  <div class="layui-container add-data" style="display: none">
    <div class="layui-row">
        <div class="layui-col-lg12">
            <fieldset class="layui-elem-field">
                <legend>{{$label}}</legend>
                <div class="layui-field-box">
                    <form class="layui-form" >
                        {{ csrf_field() }}
                        <div class="layui-form-item">
                            <label class="layui-form-label">编号</label>
                            <div class="layui-input-inline">
                            <input type="text" name="code" disabled="disabled" autocomplete="off" class="layui-input" value="{{$code}}" lay-verType="tips">
                            </div>
                            
                            <label class="layui-form-label">优先级排序</label>
                            <div class="layui-input-inline">
                            <input type="text" name="first_order"  placeholder="请输入数字" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>
                        </div>

                        <div class="layui-form-item">
                          <label class="layui-form-label">失踪人照片</label>
                          <button type="button" class="layui-btn layui-btn-normal electpic" id="electpic">选择图片</button>
                          <button type="button" class="layui-btn addpic" id="addpic">开始上传</button>
                          <img id='imgadd' src="">
                          <div class="chongbutd">
                            <button type="button" class="layui-btn layui-btn-danger addpic2" id="addpic2">重新上传</button>
                          </div>
                          <input type="hidden" class="layui-input imgcurl" name="peope_pic" id="imgcurl" value="">
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">寻人类型</label>
                            <div class="layui-input-inline">
                                <select name="find_type" lay-verify="required" required>
                                      <option value="">选择寻人类型</option>
                                  @foreach($types as $k => $v)
                                      <option value="{{$k}}">{{$v}}</option>
                                  @endforeach
                                </select>
                            </div>
<!-- required -->
                            <label class="layui-form-label">失踪人姓名</label>
                            <div class="layui-input-inline">
                            <input type="text" name="miss_name"  placeholder="请输入失踪人姓名" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>

                            <label class="layui-form-label">失踪人性别</label>
                            <div class="layui-input-inline">
                            <input type="text" name="miss_sex"  placeholder="请输入失踪人性别" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">家庭住址</label>
                            <div class="layui-input-inline">
                            <input type="text" name="miss_home" placeholder="请输入家庭住址" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>

                            <label class="layui-form-label">出生日期</label>
                            <div class="layui-input-inline">
                            <input type="text" name="miss_barth" placeholder="请输入出生日期" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>

                            <label class="layui-form-label">失踪身高</label>
                            <div class="layui-input-inline">
                            <input type="text" name="miss_high"  placeholder="请输入失踪身高" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">失踪日期</label>
                            <div class="layui-input-inline">
                            <input type="text" name="miss_date"  placeholder="请输入失踪日期" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>

                            <label class="layui-form-label">失踪地点</label>
                            <div class="layui-input-inline">
                            <input type="text" name="miss_access"  placeholder="请输入失踪地点" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>

                            <label class="layui-form-label">可能去处</label>
                            <div class="layui-input-inline">
                            <input type="text" name="maybe_access"  placeholder="请输入可能去处" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">悬赏金</label>
                            <div class="layui-input-inline">
                            <input type="text" name="miss_money"  placeholder="请输入悬赏金" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>


                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">失踪人特征</label>
                            <div class="layui-input-inline">
                            <textarea  style="width: 800px;height: 100px;"  name="miss_face" placeholder="请输入失踪人特征" class="layui-textarea"></textarea>
                            </div>
                        </div>

                      <div class="layui-form-item">
                            <label class="layui-form-label">失踪的经过</label>
                            <div class="layui-input-inline">
                            <textarea  style="width: 800px;height: 100px;"  name="miss_experience" placeholder="请输入失踪的经过" class="layui-textarea"></textarea>
                            </div>
                      </div>

                      <div class="layui-form-item">
                            <label class="layui-form-label">其他描述</label>
                            <div class="layui-input-inline">
                            <textarea  style="width: 800px;height: 100px;"  name="others" placeholder="请输入其他描述" class="layui-textarea"></textarea>
                            </div>
                      </div>

                      <div class="layui-form-item">
                            <label class="layui-form-label">联系人姓名</label>
                            <div class="layui-input-inline">
                            <input type="text" name="contact_name"  placeholder="请输入联系人姓名" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>

                            <label class="layui-form-label">联系人QQ/微信</label>
                            <div class="layui-input-inline">
                            <input type="text" name="contact_net" placeholder="请输入联系人QQ/微信" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>

                            <label class="layui-form-label">归属地</label>
                            <div class="layui-input-inline">
                                <select name="find_area" lay-verify="">
                                      <option value="">选择归属地</option>
                                  @foreach($area_find as $k => $v)
                                      <option value="{{$v->Id}}">{{$v->Name}}</option>
                                  @endforeach
                                </select>
                      </div>

                      <div class="layui-form-item">
                            <label class="layui-form-label">联系人方式</label>
                            <div class="layui-input-inline">
                            <input type="text" name="contact_phone" placeholder="请输入联系人方式" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>

                            <label class="layui-form-label">联系人邮箱</label>
                            <div class="layui-input-inline">
                            <input type="text" name="contact_email" placeholder="请输入联系人邮箱" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>
                      </div>

                      <div class="layui-form-item">
                            <label class="layui-form-label">联系人备注内容</label>
                            <div class="layui-input-inline">
                            <textarea  style="width: 800px;height: 100px;"  name="contact_other" placeholder="请输入联系人备注内容" class="layui-textarea"></textarea>
                            </div>
                      </div>

                        <div class="layui-form-item">
                            <div class="layui-input-block">
                            <button class="layui-btn " lay-submit lay-filter="addbutton">立即提交</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </div>
                    </form>
                </div>
            </fieldset>
        </div>
    </div>
</div>

  <div class="layui-container update-data" style="display: none">
    <div class="layui-row">
        <div class="layui-col-lg12">
            <fieldset class="layui-elem-field">
                <legend>{{$label}}</legend>
                <div class="layui-field-box">

                    <form class="layui-form" lay-filter="example">
                        {{ csrf_field() }}
                        <input type="hidden" name="id" value="">
                        <input type="hidden" id="hidden_url" value="{{ URL::asset('/img')}}">
                        <div class="layui-form-item">
                            <label class="layui-form-label">编号</label>
                            <div class="layui-input-inline">
                            <input type="text" name="code"  disabled="disabled" autocomplete="off" class="layui-input" value="" lay-verType="tips">
                            </div>

                            <label class="layui-form-label">优先级排序</label>
                            <div class="layui-input-inline">
                            <input type="text" name="first_order"  placeholder="请输入数字" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>
                        </div>
                        <div class="layui-form-item">
                          <label class="layui-form-label">失踪人照片</label>
                          <button type="button" class="layui-btn layui-btn-normal electpic" id="electpic">选择图片</button>
                          <button type="button" class="layui-btn addpic" id="addpic">开始上传</button>
                          <img id='imgupdate' src="">
                          <div class="chongbutd">
                            <button type="button" class="layui-btn layui-btn-danger addpic2" id="addpic2">重新上传</button>
                          </div>
                          <input type="hidden" class="layui-input imgcurl" name="peope_pic" id="imgcurl" value="">
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">寻人类型</label>
                            <div class="layui-input-inline">
                                <select name="find_type" lay-verify="">
                                      <option value="">选择寻人类型</option>
                                  @foreach($types as $k => $v)
                                      <option value="{{$k}}">{{$v}}</option>
                                  @endforeach
                                </select>
                            </div>

                            <label class="layui-form-label">失踪人姓名</label>
                            <div class="layui-input-inline">
                            <input type="text" name="miss_name"  placeholder="请输入失踪人姓名" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>

                            <label class="layui-form-label">失踪人性别</label>
                            <div class="layui-input-inline">
                            <input type="text" name="miss_sex"  placeholder="请输入失踪人性别" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">家庭住址</label>
                            <div class="layui-input-inline">
                            <input type="text" name="miss_home"  placeholder="请输入家庭住址" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>

                            <label class="layui-form-label">出生日期</label>
                            <div class="layui-input-inline">
                            <input type="text" name="miss_barth"  placeholder="请输入出生日期" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>

                            <label class="layui-form-label">失踪身高</label>
                            <div class="layui-input-inline">
                            <input type="text" name="miss_high"  placeholder="请输入失踪身高" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">失踪日期</label>
                            <div class="layui-input-inline">
                            <input type="text" name="miss_date"  placeholder="请输入失踪日期" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>

                            <label class="layui-form-label">失踪地点</label>
                            <div class="layui-input-inline">
                            <input type="text" name="miss_access"  placeholder="请输入失踪地点" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>

                            <label class="layui-form-label">可能去处</label>
                            <div class="layui-input-inline">
                            <input type="text" name="maybe_access"  placeholder="请输入可能去处" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">悬赏金</label>
                            <div class="layui-input-inline">
                            <input type="text" name="miss_money"  placeholder="请输入悬赏金" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>


                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">失踪人特征</label>
                            <div class="layui-input-inline">
                            <textarea  style="width: 800px;height: 100px;"  name="miss_face" placeholder="请输入失踪人特征" class="layui-textarea"></textarea>
                            </div>
                        </div>

                      <div class="layui-form-item">
                            <label class="layui-form-label">失踪的经过</label>
                            <div class="layui-input-inline">
                            <textarea  style="width: 800px;height: 100px;"  name="miss_experience" placeholder="请输入失踪的经过" class="layui-textarea"></textarea>
                            </div>
                      </div>

                      <div class="layui-form-item">
                            <label class="layui-form-label">其他描述</label>
                            <div class="layui-input-inline">
                            <textarea  style="width: 800px;height: 100px;"  name="others" placeholder="请输入其他描述" class="layui-textarea"></textarea>
                            </div>
                      </div>

                      <div class="layui-form-item">
                            <label class="layui-form-label">联系人姓名</label>
                            <div class="layui-input-inline">
                            <input type="text" name="contact_name"  placeholder="请输入联系人姓名" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>

                            <label class="layui-form-label">联系人QQ/微信</label>
                            <div class="layui-input-inline">
                            <input type="text" name="contact_net"  placeholder="请输入联系人QQ/微信" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>

                            <label class="layui-form-label">归属地</label>
                            <div class="layui-input-inline">
                                <select name="find_area" lay-verify="">
                                      <option value="">选择归属地</option>
                                  @foreach($area_find as $k => $v)
                                      <option value="{{$v->Id}}">{{$v->Name}}</option>
                                  @endforeach
                                </select>
                      </div>

                      <div class="layui-form-item">
                            <label class="layui-form-label">联系人方式</label>
                            <div class="layui-input-inline">
                            <input type="text" name="contact_phone" placeholder="请输入联系人方式" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>

                            <label class="layui-form-label">联系人邮箱</label>
                            <div class="layui-input-inline">
                            <input type="text" name="contact_email"  placeholder="请输入联系人邮箱" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>
                      </div>

                      <div class="layui-form-item">
                            <label class="layui-form-label">联系人备注内容</label>
                            <div class="layui-input-inline">
                            <textarea  style="width: 800px;height: 100px;"  name="contact_other" placeholder="请输入联系人备注内容" class="layui-textarea"></textarea>
                            </div>
                      </div>

                        <div class="layui-form-item">
                            <div class="layui-input-block">
                            <button class="layui-btn " lay-submit lay-filter="update-button">立即提交</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </div>
                    </form>
                </div>
            </fieldset>
        </div>
    </div>
</div>

@stop

@section('js')
  <script type="text/javascript" src="{{ URL::asset('admin/icheck/icheck.js')}}"></script>
  <script type="text/javascript" src="{{ URL::asset('admin/javascript/findpeople.js')}}"></script>
@stop
